package com.qfmy.webapp.controller.agent;

import com.qfmy.common.result.Result;
import com.qfmy.model.query.agent.VideoQuery;
import com.qfmy.webapp.service.agent.VideoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.qfmy.webapp.controller.agent
 * @date 2025/11/25
 * @description 视频
 */
@RestController
@SuppressWarnings("all")
@RequestMapping("/app/agent/video")
public class VideoController {

    /**
     * 注入service
     */
    @Autowired
    private VideoService videoService;


    /**
     * 文本转视频
     * @param videoQuery
     * @return
     */
    @RequestMapping("/textToVideo")
    public Result<String> textToVideo(@RequestBody VideoQuery videoQuery) {
        String url = videoService.textToVideo(videoQuery);
        return Result.ok(url);
    }
}
